package com.naiterui.ehp.bs.doctor.repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bp.domain.DoctorCharge;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 医生收费信息持久层接口实现
 *
 * @author Amber
 * @since 1.0.0
 */
@Repository
public interface IDoctorChargeRepository extends BaseJpaRepository<DoctorCharge, Long>  {

    List<DoctorCharge> findByDoctorId(Long doctorId);


    List<DoctorCharge> findByDoctorIdAndChargeType(Long doctorId, int type);

    DoctorCharge findFirstByDoctorIdAndChargeType(Long doctorId, int type);

    /**
     * 获取指定医生开通服务信息集合
     *
     * @param doctorIdList 医生id列表
     * @param type         收费服务类型（1：图文；2：视频）
     *
     * @return
     */
    List<DoctorCharge> findByDoctorIdInAndChargeType(List<Long> doctorIdList, int type);
}
